3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
The state of all draw regions attached to a draw context are validated by the draw context and draw region internal code before a frame is rendered. However, renderers may wish to modify their own state--for example, to alter cached information. To support such modifications, QuickDraw 3D supplies renderers with information about what has changed in the draw region via the Q3XDrawContext_GetValidationFlags routine.
The following mask values let you determine which draw region states have changed since the last frame. Call the Q3XDrawContext_ClearValidationFlags routine afterward to clear the flag information.
typedef enum TQ3XDrawContextValidationMasks {
kQ3XDrawContextValidationClearFlags = 0x00000000L,
kQ3XDrawContextValidationDoubleBuffer = 1 << 0,
kQ3XDrawContextValidationShader = 1 << 1,
kQ3XDrawContextValidationClearFunction = 1 << 2,
kQ3XDrawContextValidationActiveBuffer = 1 << 3,
kQ3XDrawContextValidationInternalOffScreen = 1 << 4,
kQ3XDrawContextValidationPane = 1 << 5,
kQ3XDrawContextValidationMask = 1 << 6,
kQ3XDrawContextValidationDevice = 1 << 7,
kQ3XDrawContextValidationWindow = 1 << 8,
kQ3XDrawContextValidationWindowSize = 1 << 9,
kQ3XDrawContextValidationWindowClip = 1 << 10,
kQ3XDrawContextValidationWindowPosition = 1 << 11,
kQ3XDrawContextValidationPlatformAttributes = 1 << 12,
kQ3XDrawContextValidationForegroundShader = 1 << 13,
kQ3XDrawContextValidationBackgroundShader = 1 << 14,
kQ3XDrawContextValidationColorPalette = 1 << 15,
kQ3XDrawContextValidationAll = ~0
} TQ3XDrawContextValidationMasks;
typedef unsigned long TQ3XDrawContextValidation;
The Q3XDrawContext_GetValidationFlags function lets you determine which draw context states have changed since the last frame.
typedef unsigned long TQ3XDrawContextValidation;
TQ3Status Q3XDrawContext_GetValidationFlags(
TQ3DrawContextObject drawContext,
TQ3XDrawContextValidation *validationFlags);
Once your renderer has updated the current draw context state, it should call the Q3XDrawContext_ClearValidationFlags routine to clear the validation flags. Otherwise flags may remain set during the next frame when the state has not changed.
TQ3Status Q3XDrawContext_ClearValidationFlags(
TQ3DrawContextObject drawContext);
Previous | QD3D Book | Overview | Chapter Contents | Next |